print('  123456789')
for lij in range(9):
    print((lij+1),('$$$$$$$$$'),(lij+1))
print('  123456789')